using UnityEngine;

namespace Crosstales.Common.Util
{
    // [Assembly-CSharp-firstpass.dll].Crosstales.Common.Util.SingletonHelper
    public class SingletonHelper
    {
        // Fields
        private static bool _isQuitting_k__BackingField;
        private static bool isInitialized;
        
        // Properties
        public static bool isQuitting { get; set; }
        
        // Methods
        public static bool get_isQuitting()
        {
            if(mem[536892811] != 0)
            {
                    return (bool)mem[536892771];
            }
            
            536892587 = 536892587;
            return (bool)mem[536892771];
        }
        public static void set_isQuitting(bool value)
        {
            if(mem[536892811] == 0)
            {
                    536892587 = 536892587;
            }
            
            mem2[0] = value;
        }
        private static SingletonHelper()
        {
            var val_3;
            if(mem[536883123] == 0)
            {
                    536882899 = 536882899;
            }
            
            if((mem[536883083] + 72) != 0)
            {
                    val_3 = 27550112;
                float val_1 = UnityEngine.Time.realtimeSinceStartup;
                UnityEngine.Debug.Log(message:  System.String.Format(format:  -1610594777, arg0:  536892547));
            }
            
            Crosstales.Common.Util.SingletonHelper.initialize();
        }
        private static void initialize()
        {
            var val_7;
            var val_8;
            var val_9;
            var val_10;
            var val_11;
            var val_12;
            val_7 = 27354792;
            val_8 = 536892587;
            if(mem[536892811] == 0)
            {
                    val_8 = 536892587;
            }
            
            val_9 = 536882899;
            val_10 = mem[mem[536892771] + 1];
            val_10 = mem[536892771] + 1;
            if(mem[536883123] == 0)
            {
                    val_9 = 536882899;
            }
            
            if(val_10 != 0)
            {
                    if((mem[536883083] + 72) == 0)
            {
                    return;
            }
            
                val_7 = 27550120;
                float val_1 = UnityEngine.Time.realtimeSinceStartup;
                UnityEngine.Debug.Log(message:  System.String.Format(format:  -1610594775, arg0:  536892547));
                return;
            }
            
            if((mem[536883083] + 72) != 0)
            {
                    float val_3 = UnityEngine.Time.realtimeSinceStartup;
                val_11 = 536892587;
                val_10 = 27550144;
                if(mem[536892811] == 0)
            {
                    val_11 = 536892587;
            }
            
                UnityEngine.Debug.Log(message:  System.String.Format(format:  -1610594769, arg0:  536892547, arg1:  536883173));
            }
            
            val_12 = 536892587;
            if(mem[536892811] == 0)
            {
                    val_12 = 536892587;
            }
            
            mem2[0] = 1;
            System.Action val_5 = 536881997;
            val_5 = new System.Action(object:  0, method:  1610683753);
            UnityEngine.Application.add_quitting(value:  val_5);
            UnityEngine.Events.UnityAction<UnityEngine.SceneManagement.Scene, System.Int32Enum> val_6 = 536879187;
            val_7 = 27354192;
            val_6 = new UnityEngine.Events.UnityAction<UnityEngine.SceneManagement.Scene, System.Int32Enum>(object:  0, method:  1610683751);
            UnityEngine.SceneManagement.SceneManager.add_sceneLoaded(value:  val_6);
        }
        private static void onSceneLoaded(UnityEngine.SceneManagement.Scene scene, UnityEngine.SceneManagement.LoadSceneMode mode)
        {
            var val_3;
            var val_4;
            var val_5;
            val_3 = 536882899;
            if(mem[536883123] == 0)
            {
                    val_3 = 536882899;
            }
            
            if((mem[536883083] + 72) != 0)
            {
                    float val_1 = UnityEngine.Time.realtimeSinceStartup;
                UnityEngine.Debug.Log(message:  System.String.Format(format:  -1610594765, arg0:  536892547));
            }
            
            val_4 = 536892587;
            if(mem[536892811] == 0)
            {
                    val_4 = 536892587;
            }
            
            mem2[0] = 0;
            val_5 = 536882909;
            if(mem[536883133] == 0)
            {
                    val_5 = 536882909;
            }
            
            mem2[0] = 1;
        }
        private static void onQuitting()
        {
            var val_3;
            var val_4;
            val_3 = 536882899;
            if(mem[536883123] == 0)
            {
                    val_3 = 536882899;
            }
            
            if((mem[536883083] + 72) != 0)
            {
                    float val_1 = UnityEngine.Time.realtimeSinceStartup;
                UnityEngine.Debug.Log(message:  System.String.Format(format:  -1610594767, arg0:  536892547));
            }
            
            val_4 = 536892587;
            if(mem[536892811] == 0)
            {
                    val_4 = 536892587;
            }
            
            mem2[0] = 1;
        }
        public SingletonHelper()
        {
        
        }
    
    }

}
